﻿using System.IO;
using ICSharpCode.SharpZipLib.Zip;



namespace openxmlconv
{
    public static class DocumentCreator
    {
        public static Document Open (string filename)
        {
            ZipFile file;
            try
            {
                file = new ZipFile(filename);
            }
            catch
            {
                throw;
            }
            ZipEntry e = file.GetEntry("content.xml");
            Stream s = file.GetInputStream(e);
            return OdfParser.Parse(s);

        }

    }
}
